from matplotlib import pyplot as plt 

import matplotlib.font_manager as fm

# 手动注册 SimHei 字体
font_path = "/home/shengjie/code/flux_demo/SimHei.ttf"
# font_path = r'D:\DesktopCode\vscomp\SimHei.ttf'
fm.fontManager.addfont(font_path)
plt.rcParams['font.family'] = 'SimHei'

plt.rcParams["axes.unicode_minus"] = False
